#include<bits/stdc++.h>
#define int long long
using namespace std;
int n,L,t1,t2,B=1024;
inline int rd(int k){
    int d=rand()*rand()%k+1;
    d=d*rand()%k+1;
    d=d*rand()%k+1;
    d=d*rand()%k+1;
    return abs(d);
}
signed main(){
    srand(time(0));
    freopen("lock.in","w",stdout);
    n=2000;
    cout<<n<<" "<<B-1<<'\n';
    for(int i=1;i<=n;i++) cout<<rd(B)-1<<" "<<rd(B)-1<<"\n"; 
    return 0;
}